.PHONY : all clean winclean doc doxy

packages = src/ipcards/*.java src/ipcards/gui/*.java src/ipcards/net/*.java src/ipcards/rulesets/*.java src/ipcards/events/*.java
class_packages = bin/ipcards/*.class bin/ipcards/gui/*.class bin/ipcards/net/*.class bin/ipcards/rulesets/*.class bin/ipcards/events/*.class

all :
	javac -d bin $(packages)

run : all
	cd bin && java ipcards.Controller
	
test : all
	cd bin && java ipcards.Controller &
	cd bin && java ipcards.Controller localhost 1337

clean :
	rm -rf $(class_packages)
	rm -rf doc

winclean :
	del $(class_packages)
	del doc

docs :
	javadoc -d doc $(packages)
	
doxy :
	doxygen IPCards_Doxygen_config

jar : all
	jar cvfm bin/IPCards.jar src/manifest.mf $(class_packages) ./decks/PlayingCards/PlayingCards.deck ./decks/PlayingCards/img/*.png ./decks/NoJokers/NoJokers.deck ./decks/NoJokers/img/*.png ./decks/Small/Small.deck ./decks/Small/img/*.png